<?php foreach($uploads as $upload): ?>
	<div class="image" id="image_<?php echo $upload['id']; ?>">
		<?php 
		$upload_path = $upload['dir'] . DS . $upload['filename'];
		echo $gershImage->resize($upload_path, "articlethumb");
		?>
		<dl>
			<dt class="title">
				<?php __('Title');?>
			</dt>
			<dd class="title">
				<span id="title_<?php echo $upload['id']?>"><?php if (!empty($upload['title'])) {echo $upload['title'];} else { echo __('Click to add'); } ?></span>
				(<?php echo $upload['order']; ?>)
				<?php echo $ajax->editor('title_' . $upload['id'], 
				'ajax_update/'.$upload['id'].'/title', // Path to the update method.
				array("okControl" => 'false', 
				"cancelControl" => 'false',
				"submitOnBlur" => true));
				?>
			</dd>
			<dt class="description"><?php __('Description');?></dt>
			<dd class="description">
				<span id="description_<?php echo $upload['id']?>"><?php if (!empty($upload['description'])){echo $upload['description'];}else{echo __('Click to add');}?></span>
				<?php echo $ajax->editor('description_' . $upload['id'], 
				'ajax_update/'.$upload['id'].'/description', // Path to the update method.
				array("okControl" => "false", 
				"cancelControl" => "false",
				"submitOnBlur" => true));
				?>
			</dd>
			<dt class="actions"><?php __('Actions');?></dt>
			<dd class="actions">
				<?php echo $ajax->link( 
				    'Delete', 
				    'deleteupload/'.$upload['id'], 
				    array( 'update' => 'images', 'class'=>'button button_delete' ),
				    'Do you want to delete this upload?'
				); 
				?>
				<?php echo $ajax->link( 
				    'Up', 
				    'orderupload/'.$upload['id'] . '/up', 
				    array( 'update' => 'images' , 'class'=>'button button_order_up')	); 
				?>
				<?php echo $ajax->link( 
				    'Down', 
				    'orderupload/'.$upload['id']. '/down', 
				    array( 'update' => 'images' , 'class'=>'button button_order_down')); 
				?>
			</dd>
		</dl>
	</div>
<?php endforeach; ?>